package com.ruoyi.edu.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.edu.mapper.CopyrightMapper;
import com.ruoyi.edu.domain.Copyright;
import com.ruoyi.edu.service.ICopyrightService;

/**
 * 软著Service业务层处理
 * 
 * @author sanda
 * @date 2024-12-30
 */
@Service
public class CopyrightServiceImpl implements ICopyrightService 
{
    @Autowired
    private CopyrightMapper copyrightMapper;

    /**
     * 查询软著
     * 
     * @param copyrightId 软著主键
     * @return 软著
     */
    @Override
    public Copyright selectCopyrightByCopyrightId(Long copyrightId)
    {
        return copyrightMapper.selectCopyrightByCopyrightId(copyrightId);
    }

    /**
     * 查询软著列表
     * 
     * @param copyright 软著
     * @return 软著
     */
    @Override
    public List<Copyright> selectCopyrightList(Copyright copyright)
    {
        return copyrightMapper.selectCopyrightList(copyright);
    }

    /**
     * 新增软著
     * 
     * @param copyright 软著
     * @return 结果
     */
    @Override
    public int insertCopyright(Copyright copyright)
    {
        return copyrightMapper.insertCopyright(copyright);
    }

    /**
     * 修改软著
     * 
     * @param copyright 软著
     * @return 结果
     */
    @Override
    public int updateCopyright(Copyright copyright)
    {
        return copyrightMapper.updateCopyright(copyright);
    }

    /**
     * 批量删除软著
     * 
     * @param copyrightIds 需要删除的软著主键
     * @return 结果
     */
    @Override
    public int deleteCopyrightByCopyrightIds(Long[] copyrightIds)
    {
        return copyrightMapper.deleteCopyrightByCopyrightIds(copyrightIds);
    }

    /**
     * 删除软著信息
     * 
     * @param copyrightId 软著主键
     * @return 结果
     */
    @Override
    public int deleteCopyrightByCopyrightId(Long copyrightId)
    {
        return copyrightMapper.deleteCopyrightByCopyrightId(copyrightId);
    }
}
